<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_keyword.*" %>
<%@page import="java.util.*" %>
<%
	Map ti_keyword = new Hashtable();
	String key = "";
	if(request.getParameter("key")!=null && !request.getParameter("key").equals("")){
		key = request.getParameter("key");
		ti_keyword.put("key_word",key);
	}
	String k_type = "";
	if(request.getParameter("k_type")!=null && !request.getParameter("k_type").equals("")){
		k_type = request.getParameter("k_type");
		ti_keyword.put("key_type",k_type);
	}

	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	String para =	"/program/admin/keyword/index.jsp?key="+key+"&k_type="+k_type+"&iStart="+Integer.parseInt(iStart)+"&limit="+limit;	
 
  	String key_id="";
  	if(request.getParameter("key_id")!=null) key_id = request.getParameter("key_id");
  	Ti_keywordInfo ti_keywordInfo = new Ti_keywordInfo();
  	List list = ti_keywordInfo.getListByPk(key_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String key_word="",location="",key_type="";
  	if(map.get("key_word")!=null) key_word = map.get("key_word").toString();
  	if(map.get("location")!=null) location = map.get("location").toString();
  	if(map.get("key_type")!=null) key_type = map.get("key_type").toString();

  %>
<html>
  <head>
    <title>修改关键字</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="key.js" charset="UTF-8"></script>
	<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
</head>

<body>

	<h1>修改关键字</h1>
	
	<!--
	<table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>-----------------</h4>
		  <span>1----------------。</span><br/>
		  <span>2----------------。</span>
		  </td>
        </tr>
      </table>
      <br/>
	  -->
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<tr>
			<td align="right" width="10%">
				关键字<font color="red">*</font>
			</td>
			<td><input name="key_word" id="key_word" value="<%=key_word%>" type="text" maxlength="20" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); " /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				搜索频率<font color="red">*</font>
			</td>
			<td><input name="location" id="location" value="<%=location%>" maxlength="8" type="text" onKeyUp="if(!/^[1-9][0-9]*$/.test(this.value))this.value=''" maxlength="10" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				类型<font color="red">*</font>
			</td>
			<td>
				<select name="key_type" id="key_type">
					<option value="">请选择</option>
					<option <%if(key_type.equals("0")){%>selected="selected"<%}%> value="0">商品</option>
					<option <%if(key_type.equals("1")){%>selected="selected"<%}%> value="1">卖家</option>
					<option <%if(key_type.equals("2")){%>selected="selected"<%}%> value="2">资讯</option>
				</select>
			</td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="jumpurl" value="<%=para%>" />
				<input type="hidden" name="bpm_id" value="6599" />
	  			<input type="hidden" name="key_id" value="<%=key_id%>" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onclick="return submitValues()" />&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='<%=para%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
